<div class="uk-layui-form">
	<form class="layui-form" action="/apps/xiaoe/mrounds/save.html" method="post">
	<input type="hidden" name="mtype" value="${type!''}">
	<input type="hidden" name="dataid" value="${dataid!''}">
	<input type="hidden" name="parentid" value="${parentid!''}">
		
		<div class="layui-collapse">
			<div class="layui-colla-item">
				<h2 class="layui-colla-title">对话基本信息</h2>
				<div class="layui-colla-content layui-show">
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">标题：</label>
							<div class="layui-input-inline" style="width: 664px;">
								<input type="text" name="name" id="name" lay-verify="required" class="layui-input" autocomplete="off">
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">匹配对话：</label>
							<div class="layui-input-inline" style="width: 664px;">
								<input type="text" name="title" id="title" lay-verify="required" class="layui-input" autocomplete="off">
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">到达后结束：</label>
							<div class="layui-input-inline" style="width:115px;">
								<input type="checkbox" name="endbyai" value="1"  lay-skin="switch" lay-text="ON|OFF">
							</div>
						</div>
						<div class="layui-inline uckefu-inline" style="margin-left:50px;">
							<label class="layui-form-label">无感知转人工：</label>
							<div class="layui-input-inline" style="width:90px;">
								<input type="checkbox" name="staticagent" value="1" lay-skin="switch" lay-text="ON|OFF">
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">信息采集：</label>
							<div class="layui-input-inline" style="width:auto;">
								<input type="checkbox" name="bussop" value="1" lay-skin="switch" lay-filter="bussop" lay-text="ON|OFF">
							</div>
						</div>
						<div class="layui-inline" style="display:none;" id="bussop_tip">
							<div class="layui-input-inline" style="width:100%;padding-top:0px;">
								<#if bussOpList??>
								<#list bussOpList as op>
								<input type="checkbox" name="busslist" title="${op.name!''}" value="${op.code!''}" lay-skin="primary">
								</#list>
								</#if>
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">回复内容：</label>
							<div class="layui-input-inline" style="width: 664px;">
								<textarea name="content" id="content" placeholder="请输入内容" class="layui-textarea" style="height:160px;resize:none;"></textarea>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="layui-colla-item layui-colla-item-show">
				<h2 class="layui-colla-title">访客应答超时设置</h2>
				<div class="layui-colla-content layui-show">
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">超时提示：</label>
							<div class="layui-input-inline" style="width:115px;">
								<input type="checkbox" name="overtimetype" value="1"  lay-skin="switch" lay-text="ON|OFF" lay-filter="overtimevo">
							</div>
						</div>
						<div class="layui-inline uckefu-inline" id="overtimevo_time" style="margin-left:50px;display:none;">
							<label class="layui-form-label">超时（秒）：</label>
							<div class="layui-input-inline" style="width:100px;">
								<select name="overtime" id="overtime">
							        <option value="5">5</option>
							        <option value="10">10</option>
							        <option value="20">20</option>
							        <option value="30">30</option>
							        <option value="40">40</option>
							        <option value="50">50</option>
							        <option value="60">60</option>
							        <option value="120">120</option>
								</select>
							</div>
						</div>
						<div class="layui-inline uckefu-inline" id="overtimevo" style="margin-left:10px;display:none;">
							<label class="layui-form-label">最大重复：</label>
							<div class="layui-input-inline" style="width:100px;">
								<select name="overtimerepeat" id="overtimerepeat">
							        <option value="1" >1</option>
							        <option value="2" >2</option>
							        <option value="3" >3</option>
								</select>
							</div>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-inline" id="overtimevo_tip" style="display:none;">
							<label class="layui-form-label">超时提示语：</label>
							<div class="layui-input-inline" style="width: 664px;">
								<input type="text" name="overtimeword" value="" id="overtimeword" class="layui-input" autocomplete="off">
							</div>
						</div>
					</div>
				</div>
			</div>
			
			<div class="layui-colla-item layui-colla-item-show">
				<h2 class="layui-colla-title">回答错误语设置</h2>
				<div class="layui-colla-content layui-show">
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">无匹配提示：</label>
							<div class="layui-input-inline" style="width:190px;">
								<input type="checkbox" name="errortype" value="1" lay-skin="switch" lay-text="ON|OFF" lay-filter="errortype">
							</div>
						</div>
						<div class="layui-inline uckefu-inline" id="errorwo" style="display:none;">
							<label class="layui-form-label">最大重复数：</label>
							<div class="layui-input-inline">
								<select name="errorepeat" id="errorepeat">
							         <option value="0" selected="selected">0</option>
							         <option value="1" >1</option>
							         <option value="2" >2</option>
							         <option value="3" >3</option>
							         <option value="4" >4</option>
							         <option value="5" >5</option>
							         <option value="6" >6</option>
							         <option value="7" >7</option>
							         <option value="8" >8</option>
							         <option value="9" >9</option>
								</select>
							</div>
						</div>
					</div>
					<div class="layui-form-item" >
						<div class="layui-inline" id="error_word_up" style="display:none;">
							<label class="layui-form-label">提示语：</label>
							<div class="layui-input-inline" style="width: 664px;">
								<input type="text" name="errorwordup"  value="" id="errorwordup" class="layui-input" autocomplete="off">
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="layui-form-button">
			<div class="layui-button-block">
				<button class="layui-btn" lay-submit lay-filter="formDemo" >立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</form>
</div>
<script language="javascript">
layui.use(['layer', 'form'], function(){
	var layer = layui.layer, form = layui.form;
	form.render(); //更新全部
	form.on('switch(overtimevo)', function(data) {
		if(data.elem.checked == true){
			$("#overtimevo").show();
			$("#overtimevo_tip").show();
			$("#overtimevo_time").show();
		}else{
			$("#overtimevo").hide();
			$("#overtimevo_tip").hide();
			$("#overtimevo_time").hide();
		}
	});
	form.on('switch(bussop)', function(data) {
		if(data.elem.checked == true){
			$("#bussop_tip").show();
		}else{
			$("#bussop_tip").hide();
		}
	});
	form.on('switch(errortype)', function(data) {
		if(data.elem.checked == true){
			$("#errorwo").show();
			$("#error_word_up").show();
		}else{
			$("#errorwo").hide();
			$("#error_word_up").hide();
		}
	});
	form.on('switch(userask)', function(data) {
		if(data.elem.checked == true){
			$("#userask_tip").show();
		}else{
			$("#userask_tip").hide();
		}
	});
	KindEditor.create('#content', {
		themeType : 'simple',
		width:"100%",
		resizeType:0,
		zIndex:100000000,
		uploadJson : "/res/image/upload.html",
		items : ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				 'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
        allowFileManager : false,
		fontsize:16
	});
});
</script>
